# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-puremagic
_pkgname=puremagic
pkgver=1.30
pkgrel=1
pkgdesc="Pure python module that will identify a file based off it’s magic numbers."
arch=('any')
url='https://pypi.org/project/puremagic/'
license=('MIT')
depends=('python')
makedepends=('python-setuptools' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('2ba05394ee0855e05eeba8e3923aad63c3d5b811ff4f37bc866ab9d62c3a77b5aa8cb77936d029f948f907f093adff0e07536c168c550d1a0e457d548d65ea99')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

